package dm.ast.model.gen;

import dm.ast.DmASTNode;
import dm.ast.DmOrderby;
import dm.ast.model.gen.factory.ComplexityModel;
import dm.ast.model.gen.factory.OrderModelFactory;

public class OrderGen extends ASTGenBase{
    @Override
    public DmASTNode gen(int astLevel, int wid_t, int dep_t) {
        DmOrderby orderby = new DmOrderby();
        orderby.setTargetWidt(wid_t);
        orderby.setTargetDept(dep_t);

        ComplexityModel model = OrderModelFactory.groupModels(wid_t , dep_t);

        orderby.setItemSize(model.count);
        return orderby;
    }
}
